/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pkgUtil.pkgJavaDB;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author Armando
 */
public class ConnectionDB {
 
    public static Connection getConnection(boolean createDb) throws SQLException {
    Connection dbConnection;
    String strUrl;
    if(createDb){
      strUrl="jdbc:derby:PAS;create=true";
    }
    else{
      strUrl="jdbc:derby:PAS";
    }
    
    dbConnection = DriverManager.getConnection(strUrl);
    return dbConnection;
  }
    
}
